package com.zhuzg.service.impl;





import com.zhuzg.mapper.StoreMapper;
import com.zhuzg.service.StoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

//
@Service
public class StoreServiceImpl implements StoreService {

    @Autowired
    StoreMapper storeMapper;

    @Override
    public int deduceStore(Integer userId, int num) {

        if (num==5)
            throw  new RuntimeException("测试分布式事务");
        return storeMapper.update(userId,num);
    }
}
